﻿using System;
using System.Windows;
using System.Windows.Input;

namespace LEShortcut.Commands
{
    public class AllowDragCommand : ICommand
    {
        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            var e = parameter as DragEventArgs;
            if (e != null)
            {
                e.Effects = DragDropEffects.Copy;
                e.Handled = true;
            }
        }

        public event EventHandler CanExecuteChanged;
    }
}